package com.puchi.sdkdemo;

import com.puchi.sdkdemo.utils.H5interactive;


public class JSBridge {
    /*--------------------------------------------------*/
    //上报埋点⽇志
    public static void appLog_dot(String key,String value){
        //将json字符串转化为JSONObject
       H5interactive.Companion.get().interactive(1,0,value,key);
    }

    //获取app配置
    public static void getSystemInfo(double key){
        // 0 获取手机屏幕宽高
        H5interactive.Companion.get().interactive(0, (int) key,"","");
    }
    //打开banner广告
    /**type	是	int	约定广告显示位置 （0显示在顶部， 1显示在中间，2显示在底部）
     value	是	string	广告视图的宽高 (json 数据)
     */
    public static void loadBannerExpressAd(double type,String value){

        H5interactive.Companion.get().interactive(2,(int)type,value,"");
    }
    /*打开插屏广告*/
    public static void showInteractionExpressAd(String value){
        H5interactive.Companion.get().interactive(3,0,value,"");
    }
    /*打开激励视频*/
    public static void showRewardVideoAd(double type,String value){

        H5interactive.Companion.get().interactive(4,(int)type,value,"");

    }
    /*打开信息流广告*/
    public static void loadNativeExpressAd(String value){
        H5interactive.Companion.get().interactive(5,0,value,"");

    }

    public static void close_adver_dialog(String id){
        H5interactive.Companion.get().interactive(6,0,"",id);
    }
    //设置回调
    public static void setAppCallback(double key,String name){
        H5interactive.Companion.get().interactive(7,(int)key,name,"");
    }
    //启动Android系统功能
    public static void open_system_fun(double key){
        H5interactive.Companion.get().interactive(8,(int)key,"","");
    }
    /*打开全屏视频*/
    public static void loadFullScreenVideoAd(double type,String value){
        H5interactive.Companion.get().interactive(9,(int)type,value,"");
    }
}
